<div id="content_header">
  <h3>Make Up Test Schedules</h3>
</div>

<div class="row row-unstyled">
  <div class="col-md-12">
    <label for="keyword">SEARCH</label>  
  </div>
</div>

<div class="row">
  <div class="col-md-6 col-lg-4">
    <form class="form-vertical">
      <div class="input-group">
        <input class="form-control" type="text" name="keyword" placeholder="Type Name to search" ng-model="searchText">
        <span class="input-group-addon">Find!</span>
      </div>
    </form>
  </div>
  <div class="col-md-6">
    <a ui-sref="^.schedulenew" class="btn btn-primary">New Schedule (single)</a>
    <a ui-sref="^.schedulenewbatch" class="btn btn-primary">New Schedule (batch)</a>
  </div>
</div>

<br />

<div class="row">
  <div class="col-md-12">
    <label for="keyword">RESULT</label>  
    <div class="search-message">
      Found <span class="primary-color"><b>{{ (mtSchedules | filter:searchText).length }}</b></span> matched records
    </div>
    
  </div>
</div>

<div class="row">
  <div class="col-md-12">
    <table class="table table-stripped table-bordered" ng-show="mtSchedules.length > 0">
      <thead>
        <tr>
          <th>Term</th>
          <th>Schedule</th>
          <th>Status</th>
          <th>Action</th>
        </tr>
      </thead>
      <tbody>
        <!-- <tr ng-repeat="schedule in mtSchedules | filter:searchText | orderBy: 'CountryName'"> -->
        <tr dir-paginate="schedule in mtSchedules | itemsPerPage: pagesize" total-items="totalItems">
          <td>{{ schedule.Term.Number }} / {{ schedule.Term.Year }}</td>
          <td>{{ schedule.DateTime | date: 'medium' }}</td>
          <td>
            {{ (schedule.IsRegular)?'Regular':'Non Regular' }}
          </td>
          <td>
            <a class="" href="" ng-click="deleteSchedule(schedule.CountryId)"><i class="simple-icon-trash"></i></a>
            <a class="" ui-sref="^.scheduleedit({id: schedule.Id})"><i class="glyphicon glyphicon-edit"></i></a>
          </td>
        </tr>
      </tbody>
    </table>
    <dir-pagination-controls on-page-change="pageChanged(newPageNumber)" template-url="views/templates/dirPagination.tpl.html"></dir-pagination-controls>
    
  </div>
</div>